#include"UnionFind.hpp"
void test_UnionV()
{
	UnionFindSet v(6);
	cout << v.SetCount() << endl;//6
	v.Union(3, 4);
	v.Union(3, 5);
	v.Union(0,1);
	v.Union(0,2);
	cout << v.FindRoot(3) << endl;//3
	cout << v.FindRoot(2) << endl;//0
	cout << v.SetCount() << endl;//2

	v.Union(0, 3);
	cout << v.SetCount() << endl;//1
	cout << v.FindRoot(3) << endl;//0
}
int main()
{
    test_UnionV();
    return 0;
}